<?php
namespace Admin\Controller;

class IndexController extends BaseController {
    public function index(){


    	$menu = M("level")->where(array("pid"=>0,"hidden"=>0))->select();

    	foreach ($menu as &$v) {
    		$erji = M("level")->where(array("pid"=>$v["id"],"hidden"=>0))->select();
    		$v["zi"] = $erji;
    	}
    	$level = implode(",",session("level"));


        //$this->display();//没跨控制器没跨操作 则就默认加载当前模块view文件中当前控制器下的当前操做
        $this->assign("menu",$menu);
        $this->assign("level",$level);
        $this->display();//加载当前模块view文件中news控制器下的news.html
    }
}
?>